<?php

namespace Database\Factories;

use App\Models\Admin;
use App\Models\ShopCate;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Shop>
 */
class ShopFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'name' => fake()->name(),
            'url' => fake()->imageUrl(300, 300),
            'description' => fake()->text(),
            'price' => fake()->randomFloat(2, 0, 100),
            'stock_quantity' => fake()->numberBetween(0, 100),
            'shop_cate_id' => ShopCate::inRandomOrder()->first()->id,
            'admin_id' => Admin::inRandomOrder()->first()->id,
            'order' => fake()->randomFloat(2, 0, 100),
        ];
    }
}
